package com.magicsoft.share.adapter.share;

import android.support.annotation.LayoutRes;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.magicsoft.share.R;
import com.magicsoft.share.bean.share.Special;

/**
 * Created by lyf on 2017/10/26/026.
 */

public class SpecialAdapter extends BaseQuickAdapter<Special, BaseViewHolder> {
    public SpecialAdapter(@LayoutRes int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, Special item) {
        helper.setText(R.id.tv_title, item.getSpecial_name());
        ImageView imageView = (ImageView) helper.getView(R.id.iv);
//        Glide.with(mContext).load(R.drawable.helena_hertz).error(R.drawable.img_error).
//                transform(new GlideRoundTransform(mContext, 10)).into(imageView);
        Glide.with(mContext).load(item.getSpecial_img()).into(imageView);

    }
}
